LassoScript Utility
Basics Browse Detail

[String->Size]

Tag Link [String->Size] Category String
Type Member Source Available No
Support Preferred Version 6.0
Change Unchanged Data Source Any
Output Type Integer Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0

Description

[String->Size] returns the number of characters that are in a string variable. It is equivalent to [String_Length] and is similar to [Array->Size] or [Map->Size].

Syntax

['Base String'->Size]

[Variable: 'myString' = 'A string']
[Loop: $myString->Size]
...
[/Loop]

Parameters

No Parameters Required.

Change Notes

In prior versions of Lasso this tag was named [String->Length].

Examples

To report the size of a string:

Use the [String->Size] tag. The following example reports how long a sample string is.

[Variable: 'myString' = 'A quick brown fox']
The string is [$myString->(Size)] characters long!

The string is 17 characters long!

Related Tags

Category Tags